#ifndef CLICKBTN_H
#define CLICKBTN_H

#include<QObject>
#include<QPushButton>
#include<QDebug>
#include<QWidget>
#include<QMouseEvent>
#include"global.h"
class ClickBtn:public QPushButton
{
    Q_OBJECT
public:
    ClickBtn(QWidget*parent=nullptr);
    ~ClickBtn();
    void SetState(QString normal,QString hover,QString press);
protected:
    virtual void mouseReleaseEvent(QMouseEvent *e) override;
    virtual void mousePressEvent(QMouseEvent *e) override;
    virtual void enterEvent(QEvent *event) override;
    virtual void leaveEvent(QEvent *event) override;
private:
    QString _normal;
    QString _hover;
    QString _press;
};

#endif // CLICKBTN_H
